﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="ImportWorkDate.aspx.cs" Inherits="WorkTime_ImportWorkDate" %>

<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="cc1" %>
<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc2" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        allowadd="True" allowdelete="True" allowprint="True" allowupdate="True" alwaysclose="False"
        autoapplyforinsert="False" autorecordlock="False" autorecordlockmode="NoneReload"
        cachedataset="True" commandname="" commandtext="" datamember="WorkTime_WorkOn"
        eof="True" keyvalues="" lastindex="-1" marker="'" masterdatasource="" packetrecords="100"
        quoteprefix="[" quotesuffix="]" remotename="" selectcommand="" tablename="">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsWorkTime_WorkOnEmployeeId" runat="server" selectalias="Usasdb"
        selectcommand="SELECT Employees.EmployeeID, Employees.EmpName, 
      Department.DepartmentName
FROM Employees INNER JOIN
      Department ON 
      Employees.DepartmentId = Department.DepartmentId
WHERE (Employees.EmpStatus = 1)" cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdefault id="WebDefault1" runat="server" datamember="WorkTime_WorkOn"
        datasourceid="Master">
        <fields>
                <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="Id" />
                <InfoLight:DefaultFieldItem DefaultValue="GetOnDuty()" FieldName="OnDuty" />
                <InfoLight:DefaultFieldItem DefaultValue="GetOffDuty()" FieldName="OffDuty" />
            </fields>
    </infolight:webdefault>
    <infolight:validatefielditem checknull="True" fieldname="EmployeeId">
    </infolight:validatefielditem>
    <infolight:validatefielditem checknull="True" fieldname="OnDuty">
    </infolight:validatefielditem>
    <infolight:validatefielditem checknull="True" fieldname="OffDuty">
    </infolight:validatefielditem>
    <asp:Label ID="PageErrLabel" runat="server" ForeColor="Red" Text="Label" Visible="False"
        Width="100%"></asp:Label>
    <infolight:webvalidate id="wvWorkTime_WorkOn" runat="server" datamember="WorkTime_WorkOn"
        datasourceid="Master" duplicatecheck="False" duplicatecheckmode="ByLocal" forecolor="Red"
        validatechar="*" validatecolor="Red" validatestyle="ShowLable">
        <fields>
<InfoLight:ValidateFieldItem FieldName="Id" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="EmployeeId" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="OnDuty" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="OffDuty" CheckNull="True"></InfoLight:ValidateFieldItem>
   </fields>
    </infolight:webvalidate>
    <infolight:webnavigator id="WebNavigator1" runat="server" bindingobject="wgvMaster"
        width="100%" statusstrip="WebStatusStrip1" showdatastyle="GridStyle" cssclass="NavigatorBar"
        ctlheight="25">
        <navcontrols>
                <InfoLight:ControlItem ControlName="Add" ControlText="穝糤" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/add_C.gif" MouseOverImageUrl="../image/uipics/add2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/add3_C.gif" />
                <InfoLight:ControlItem ControlName="Apply" ControlText="郎" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/apply_C.gif" MouseOverImageUrl="../image/uipics/apply2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/apply3_C.gif" />
                <InfoLight:ControlItem ControlName="Abort" ControlText="斌" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/abort_C.gif" MouseOverImageUrl="../image/uipics/abort2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/abort3_C.gif" />
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query_C.gif" MouseOverImageUrl="../image/uipics/query2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/query3_C.gif" />
            </navcontrols>
        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
    </infolight:webnavigator>
    <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
            <td style="width: 35px;" align="right" valign="middle">
                <asp:Label ID="LLabel1" runat="server" Text="年份:" Width="30px"></asp:Label>
            </td>
            <td align="right" style="width: 50px;" valign="middle">
                <asp:DropDownList ID="DlYear" runat="server" Width="60px">
                    <asp:ListItem>2008</asp:ListItem>
                    <asp:ListItem>2009</asp:ListItem>
                    <asp:ListItem>2010</asp:ListItem>
                    <asp:ListItem Selected="True">2011</asp:ListItem>
                    <asp:ListItem>2012</asp:ListItem>
                    <asp:ListItem>2013</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 52px;" align="right" valign="middle">
                <asp:Label ID="LLabel2" runat="server" Text="月份:" Width="35px"></asp:Label>
            </td>
            <td style="width: 73px;">
                <asp:DropDownList ID="DLMonth" runat="server" Width="60px">
                    <asp:ListItem Value="1">1月</asp:ListItem>
                    <asp:ListItem Value="2">2月</asp:ListItem>
                    <asp:ListItem Value="3">3月</asp:ListItem>
                    <asp:ListItem Value="4">4月</asp:ListItem>
                    <asp:ListItem Value="5">5月</asp:ListItem>
                    <asp:ListItem Value="6">6月</asp:ListItem>
                    <asp:ListItem Value="7">7月</asp:ListItem>
                    <asp:ListItem Value="8">8月</asp:ListItem>
                    <asp:ListItem Value="9">9月</asp:ListItem>
                    <asp:ListItem Value="10">10月</asp:ListItem>
                    <asp:ListItem Value="11">11月</asp:ListItem>
                    <asp:ListItem Value="12">12月</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 73px;">
                <asp:Label ID="Label1" runat="server" Text="员工:"></asp:Label>
            </td>
            <td style="width: 73px;">
                <uc1:SelUser ID="SelUser" runat="server" />
            </td>
            <td style="width: 40px;" align="right">
                <asp:Label ID="LLabel3" runat="server" Text="部门:" Width="35px"></asp:Label>
            </td>
            <td align="center" style="width: 46px;">
                <uc2:DepartmentDList ID="DepartmentDList1" runat="server" />
            </td>
            <td align="center" style="width: 175px;">
                <span class="roundbtn">
                    <asp:LinkButton ID="Refresh" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;筛 选&nbsp;&nbsp;&nbsp;&nbsp;"
                        OnClick="Refresh_Click"></asp:LinkButton>
                </span>
            </td>
            <td align="center" style="width: 288px;">
            </td>
        </tr>
    </table>
    <asp:Panel ID="Panel1" runat="server" Visible="false">
        <fieldset>
            <legend><font size="4">导入考勤数据文件</font></legend>
            <table cellpadding="0" cellspacing="5" class="TbSearch">
                <tr>
                    <td style="width: 337px">
                        <input id="FindFile" type="file" runat="server" name="FindFile" style="width: 600px">
                    </td>
                    <td align="center">
                        <span class="roundbtn">
                            <asp:LinkButton ID="AddFile" runat="server" Text=" 添加文件 " OnClick="AddFile_Click"></asp:LinkButton>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td rowspan="3" style="width: 337px">
                        <asp:ListBox ID="FileList" runat="server" CssClass="txtbox" Height="100px" Width="600px"
                            SelectionMode="Multiple"></asp:ListBox>
                    </td>
                    <td align="center">
                        <span class="roundbtn">
                            <asp:LinkButton ID="RemvFile" runat="server" Text=" 删除文件 " OnClick="RemvFile_Click"></asp:LinkButton>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <span class="roundbtn">
                            <asp:LinkButton ID="LinkButton1" runat="server" Text=" 上传文件数据 " OnClick="Upload_ServerClick"></asp:LinkButton>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                </tr>
            </table>
        </fieldset>
    </asp:Panel>
    <infolight:webgridview id="wgvMaster" runat="server" cellpadding="5" datasourceid="Master"
        forecolor="#333333" width="100%" aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        backcolor="White" bordercolor="White" borderstyle="Groove" borderwidth="2px"
        datamember="WorkTime_WorkOn" pagesize="15">
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <navcontrols>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
<asp:TemplateField ShowHeader="False"><EditItemTemplate>
<asp:ImageButton id="ImageButton1" runat="server" Text="Update" CausesValidation="True" ImageUrl="~/Image/UIPics/OK.gif" CommandName="Update" __designer:wfdid="w3"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton2" runat="server" Text="Cancel" CausesValidation="False" ImageUrl="~/Image/UIPics/Cancel.gif" CommandName="Cancel" __designer:wfdid="w4"></asp:ImageButton>
</EditItemTemplate>
    <headerstyle wrap="False" />
<ItemTemplate>
<asp:ImageButton id="ImageButton3" runat="server" Text="Edit" CausesValidation="False" ImageUrl="~/Image/UIPics/Edit.gif" CommandName="Edit" __designer:wfdid="w1"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton4" runat="server" Text="Delete" CausesValidation="False" ImageUrl="~/Image/UIPics/Delete.gif" CommandName="Delete" __designer:wfdid="w2"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="编号" SortExpression="Id" ReadOnly="True" />
                <asp:TemplateField HeaderText="员工工号" SortExpression="EmployeeId">
                    <edititemtemplate>
<InfoLight:WebRefVal runat="server" ReadOnly="False" DataBindingField="EmployeeId" MultiLanguage="False" ResxFilePath="" BindingText="" DataSourceID="wdsWorkTime_WorkOnEmployeeId" ButtonImageUrl="../Image/refval/RefVal.gif" Width="130px" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" ID="wrvWorkTime_WorkOnEmployeeIdE" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal>
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebRefVal runat="server" ReadOnly="False" DataBindingField="EmployeeId" MultiLanguage="False" ResxFilePath="" BindingText="" DataSourceID="wdsWorkTime_WorkOnEmployeeId" ButtonImageUrl="../Image/refval/RefVal.gif" Width="130px" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" ID="wrvWorkTime_WorkOnEmployeeIdF" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal>
</footertemplate>
                    <itemtemplate>
<InfoLight:WebRefVal runat="server" ReadOnly="True" DataBindingField="EmployeeId" MultiLanguage="False" ResxFilePath="" BindingText="" DataSourceID="wdsWorkTime_WorkOnEmployeeId" ButtonImageUrl="../Image/refval/RefVal.gif" BorderStyle="None" Width="130px" DataValueField="EmployeeID" BackColor="Transparent" UpdatePanelID="" ResxDataSet="" ID="wrvWorkTime_WorkOnEmployeeId" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal>
</itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DepartmentName" HeaderText="部门" SortExpression="DepartmentName" ReadOnly="True" />
                <asp:TemplateField HeaderText="上班时间" SortExpression="OnDuty">
                    <edititemtemplate>

<cc1:ZLTextBox id="wdtpWorkTime_WorkOnOnDutyE" language="English" runat="server" Width="128px" InputType="date" Text='<%# Bind("OnDuty") %>'></cc1:ZLTextBox>
</edititemtemplate>
                    <footertemplate>
<cc1:ZLTextBox id="wdtpWorkTime_WorkOnOnDutyE" language="English" runat="server" Width="128px" __designer:wfdid="w8" InputType="date" Text='<%# Bind("OnDuty") %>'></cc1:ZLTextBox>
</footertemplate>
                    <itemtemplate>
<asp:Label id="lWorkTime_WorkOnOnDuty" runat="server" Text='<%# Bind("OnDuty") %>' ToolTip="OnDuty" __designer:wfdid="w5"></asp:Label> 
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="下班时间" SortExpression="OffDuty">
                    <edititemtemplate>
<cc1:ZLTextBox id="wdtpWorkTime_WorkOnOffDutyE" language="English" runat="server" Width="128px" InputType="date" Text='<%# Bind("OffDuty") %>'></cc1:ZLTextBox>
</edititemtemplate>
                    <footertemplate>
<cc1:ZLTextBox id="wdtpWorkTime_WorkOnOffDutyE" language="English" runat="server" Width="128px" InputType="date" Text='<%# Bind("OffDuty") %>'></cc1:ZLTextBox>
</footertemplate>
                    <itemtemplate>
<asp:Label runat="server" ToolTip="OffDuty" ID="lWorkTime_WorkOnOffDuty" Text='<%# Bind("OffDuty") %>'></asp:Label>
</itemtemplate>
                </asp:TemplateField>
</columns>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
        <addnewrowcontrols>
                <InfoLight:AddNewRowControlItem ControlID="wrvWorkTime_WorkOnEmployeeIdF" ControlType="RefVal"
                    FieldName="EmployeeId" />
                <InfoLight:AddNewRowControlItem ControlID="wdtpWorkTime_WorkOnOnDutyE" ControlType="TextBox"
                    FieldName="OnDuty" />
                <InfoLight:AddNewRowControlItem ControlID="wdtpWorkTime_WorkOnOffDutyE" ControlType="TextBox"
                    FieldName="OffDuty" />
            </addnewrowcontrols>
    </infolight:webgridview>
</asp:Content>
